//
//  VideoTableViewCell.m
//  WeiDuYY
//
//  Created by eluosi on 2019/1/23.
//  Copyright © 2019 W ke杨. All rights reserved.
//

#import "VideoTableViewCell.h"
@implementation VideoTableViewCell

// 重写父类的构造方法
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    // 子类调用父类的方法
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        // cell 添加控件
        // 注意 必须用self.
        [self addSubview:self.imgen];
        [self addSubview:self.titleshang];
        [self addSubview:self.titlere];
        [self addSubview:self.titledian];
        [self addSubview:self.img];
        [self addSubview:self.imgend];
        [self addSubview:self.xiaoguotu];
    }
    
    
    
    return self; // cell
}
//重写属性的set方法
-(UIImageView *)img{

    if(!_img){

        _img= [[UIImageView alloc]initWithFrame:CGRectMake(20, 40, 100, 150)];

    }


    return _img;
}


-(UIImageView *)imgen{
    
    if(!_imgen){
        
        _imgen= [[UIImageView alloc]initWithFrame:CGRectMake(150, 40, 100, 150)];
        
    }
    
    
    return _imgen;
}
//首页效果图
-(UIImageView *)xiaoguotu{
    
    if(!_xiaoguotu){
        
        _xiaoguotu= [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 414, 300)];
        
    }
    
    
    return _xiaoguotu;
}

-(UIImageView *)imgend{
    
    if(!_imgend){
        
        _imgend= [[UIImageView alloc]initWithFrame:CGRectMake(280, 40, 100, 150)];
        
    }
    
    
    return _imgend;
}
-(UILabel *)titledian{
    if (!_titledian) {
        _titledian = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 414, 40)];
        
    }
    return _titledian;
}
-(UILabel *)titlere{
    if (!_titlere) {
        _titlere = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 414, 40)];

        
    }
    return _titlere;
}
-(UILabel *)titleshang{
    if (!_titleshang) {
        _titleshang = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 414, 40)];
        
        
    }
    return _titleshang;
}
- (void)loadData:(Model *)mod{
    if (mod) {
//        self.titleLab.text= mod.title;
//        self.img.image=[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:mod.imgsrc]]];
    }
    
}

@end
